package com.sc.nft.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.dao.PackageRuleDao;
import com.sc.nft.entity.PackageRule;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.sc.nft.service.PackageRuleService;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * 套餐主表服务接口实现
 *
 * @author zxy
 * @since 2023-10-14 02:01:22
 * @description 汇付相关
 */
@Slf4j
@RequiredArgsConstructor
@Service
public class PackageRuleServiceImpl implements PackageRuleService {
    private final PackageRuleDao packageRuleDao;

    @Override
    public PackageRule getByCollectionId(Long collectionId) {
        return packageRuleDao.getByCollectionId(collectionId);
    }

    @Override
    public List<PackageRule> simpleList() {
        return packageRuleDao.simpleList();
    }

    @Override
    public PackageRule getById(Long id) {
        return packageRuleDao.getById(id);
    }

    @Override
    public Page<PackageRule> getAdminPage(Page page, String packageName, Long collectionId, Date startTime, Date endTime) {
        return packageRuleDao.getAdminPage(page,packageName, collectionId,startTime,endTime);
    }
}